package com.service;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jack01
 */
@SpringBootApplication
@RestController
@EnableCircuitBreaker
@EnableHystrixDashboard
@RequestMapping("/*")
public class Service1Entry {

    public static void main(String[] args) throws Exception {
        SpringApplication.run(Service1Entry.class, args);
    }

    @RequestMapping("/service")
    @HystrixCommand
    public String service1() {
        return "test-service1";
    }
}
